<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>点击按钮不断递增</title>
  <style type="text/css">
   
  </style>
  <script type="text/javascript">
    window.onload = function (){
      var In = document.getElementsByTagName('input');
      var arr = ["A","B","C","D","E"];
      for (var i = 0; i < In.length; i++) {
        In[i].num = 0;
       In[i].onclick = function (){
        this.value = arr[this.num];
        this.num++;
        if(this.num == arr.length){
          this.num = 0; 
        }
       }
      };

   }
  </script>
</head>
<body>
  <input type="button" value="0">
  <input type="button" value="0">
  <input type="button" value="0">
  <input type="button" value="0">
</body>
</html>